package models.crawlers.common;

public class WebSiteInfo {
    public String errorMessage;
    public boolean isError;
    public SitePathInfo currentSitePath;
    public int categoryIndex;
    public int productIndex;
    public int categoriesCount;
    public int productsCount;
    public boolean isCompleted;

    public WebSiteInfo(SitePathInfo categoryPath, int categoriesCount, int productsCount){
        this.categoriesCount = categoriesCount;
        this.productsCount = productsCount;
        this.currentSitePath = categoryPath;
    }
    
    public double getProgress(){
        return ((double)productIndex / (double)productsCount)*100;
    }
}
